﻿//
//  YHLayer.h
//  ThunderWarriors
//
//  Created by mac on 12-12-23.
//
//

#ifndef ThunderWarriors_YHLayer_h
#define ThunderWarriors_YHLayer_h
#include "cocos2d.h"
#include "YHLayerDefine.h"
#include "YHClassFactory.h"

USING_NS_CC;

class YHLayer : public CCLayer {
public:
    YHLayer();
    virtual ~ YHLayer();
    virtual bool init();
    CREATE_FUNC(YHLayer)
    CREATE_FUNC_LAYER_WITHID(YHLayer)
    DECLARE_CREATE_CLASS(YHLayer)
    virtual void initData();
    virtual void initView();
    virtual void refreshData();
    virtual void refreshView();
    
    void setVisibleAndTouchEnabled(bool bIsVisible, bool bIsTouchEnabled);
    CC_SYNTHESIZE(GameLayerIdType, m_layerId, LayerIdType)
    //以下三个都是为了打开界面之前传递数据的
    CC_SYNTHESIZE(int, m_layerFlag1, LayerFlag1)
    CC_SYNTHESIZE(int, m_layerFlag2, LayerFlag2)
    CC_SYNTHESIZE(void*, m_layerFalgData, LayerFalgData);//如果data是new出来的对象，需要自己负责释放
};

#endif
